#include <iostream>
#include <stdlib.h>
#ifdef _WIN32
#include "windows.h"
#endif

using namespace std;

int main(int argc, char * argv[]) {

  const string DESC = "Make new file...";
  const int SUBTYPE = 1;
  const int AUX = 2;
  
  if (argc < 2) {
    cout<<"Error: Must have arguments";
    return 1;
  } else if (string(argv[1]) == "-h") {
    cout<<DESC;
  } else if (string(argv[1]) == "-t") {
    cout<<SUBTYPE;
  } else if (string(argv[1]) == "-x") {
    cout<<AUX;
  } else if (argc < 3) {
    cout<<"Error: Must have two arguments";
  } else {
    string cmd = string(argv[1]) + "/" + string(argv[2]);
    #ifdef _WIN32
    CreateFile(cmd.c_str(), GENERIC_READ | GENERIC_WRITE, NULL, NULL, CREATE_NEW, FILE_ATTRIBUTE_NORMAL, NULL);
    #else
    cmd = "touch " + "\"" + cmd + "\"";
    system(cmd.c_str());
    #endif
  }
  
  return 0;
}
